package com.mm.dictionary.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @BelongsProject: 9.English_dictionary
 * @BelongsPackage: com.example.english_dictionary.model
 * @Author : 游在海里的鱼
 * @CreateTime : 2024-05-13  21:23
 * @Version : 1.0
 * @ClassName : TODO
 * @Description : TODO
 */
@Data
@TableName("t_word")
public class Word {
    //编号
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    //用户id
    private Long uid;
    //单词
    private String word;
    //音标
    private String phonetic;
    //词性
    private String nature;
    //译文
    private String translation;
    //备注
    private String remark;
    //统计
    private Integer count;
    //创建时间
    @JsonFormat( pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;
    //修改时间
    @JsonFormat( pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;

    public void addCount(){
        this.count++;
    }
}
